20.4 Combining partition functions